package edu.zut.cs.software.estateagent.message.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import edu.zut.cs.software.base.domain.BaseEntity;

@Table(name = "T_Message") // 声名数据库表名
@Entity // 声名持久化类
public class Message extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 33775908080604929L; // 生成序列化ID，防止反序列化失败

	private long id; // 消息的编号
	
	private String Sender; // 发送人
	
	private String Time; // 发送时间

	private String ReceivingPerson; // 接收人
		
	private String Content; // 发送内容

	
	// 用注解描述持久化类和数据库表的对应联系
	@GeneratedValue(strategy = GenerationType.AUTO) // 生成主键的方式
	@Id // 映射主键属性
	@Column(name = "C_no") // 声名id在数据库的列名
	public Long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getSender() {
		return Sender;
	}

	public void setSender(String sender) {
		Sender = sender;
	}

	public String getTime() {
		return Time;
	}

	public void setTime(String time) {
		Time = time;
	}

	public String getReceivingPerson() {
		return ReceivingPerson;
	}

	public void setReceivingPerson(String receivingPerson) {
		ReceivingPerson = receivingPerson;
	}

	public String getContent() {
		return Content;
	}

	public void setContent(String content) {
		Content = content;
	}
	


}
